import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		// 放置初始状态 app启动的时候的全局的初始值
		isLogin: false, //用户登录状态
		userid: "",
		password: "",
		allId: '',
		token: '',
		roleId: 20
	},
	mutations: {
		updateLoginState(state, isLogin, userid, token) {

			state.isLogin = isLogin;
			state.userid = userid;
			state.token = token;


		}



	}
})
export default store

const baseurl = 'http://localhost:8098'
export {
	baseurl
}